package cn.serein.charging.order.mqtt;

import cn.serein.charging.order.dao.mappers.OrderFailMapper;
import cn.serein.charging.order.dao.mappers.OrderSuccessMapper;
import cn.serein.charging.order.dao.repository.ChargingProcessRepository;
import cn.serein.charging.order.feign.CostClient;
import cn.serein.charging.order.websocket.WebSocketServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Properties;


// 将mqtt的连接和订阅主题封装
@Component
public class MqttContext {

    @Autowired
    private OrderSuccessMapper orderSuccessMapper;


    @Autowired
    private CostClient costClient;

    public CostClient getCostClient() {
        return costClient;
    }


    /**
     * 注入失败的mapper接口
     * @return
     */
    @Autowired
    private OrderFailMapper orderFailMapper;

    public OrderSuccessMapper getOrderSuccessMapper() {
        return orderSuccessMapper;
    }

    public OrderFailMapper getOrderFailMapper() {
        return orderFailMapper;
    }


    @Autowired
    private ChargingProcessRepository chargingProcessRepository;

    public ChargingProcessRepository getChargingProcessRepository() {
        return chargingProcessRepository;
    }

    @Autowired
    private WebSocketServer webSocketServer;
    public WebSocketServer getWebSocketServer() {
        return webSocketServer;
    }
}
